﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Gateway.EFCore.Migrations
{
    public partial class db_init_20240205151433 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "DataDic",
                columns: table => new
                {
                    DataDicId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "字典名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Code = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "字典编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Value = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "字典值")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Description = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "描述")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序序号"),
                    ParentId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "父级标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DicType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "字典类别")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DataDic", x => x.DataDicId);
                },
                comment: "数据字典")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Department",
                columns: table => new
                {
                    DepartmentId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DepartmentCode = table.Column<string>(type: "varchar(50)", nullable: false, comment: "项目编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LevelCode = table.Column<string>(type: "varchar(500)", nullable: true, comment: "层级标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DepartName = table.Column<string>(type: "varchar(200)", nullable: false, comment: "部门名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ParentId = table.Column<string>(type: "varchar(36)", nullable: true, comment: "父级标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Remark = table.Column<string>(type: "varchar(2000)", nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SeqNo = table.Column<int>(type: "int", nullable: false, comment: "排序序号"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Department", x => x.DepartmentId);
                },
                comment: "部门表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "DescribeDomain",
                columns: table => new
                {
                    DescribeDomainId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DomainName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DomainId = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AliDomain = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    InstanceEndTime = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    InstanceExpired = table.Column<bool>(type: "tinyint(100)", maxLength: 100, nullable: false),
                    DnsServers = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ModifiedTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
                    Endpoint = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DescribeDomain", x => x.DescribeDomainId);
                },
                comment: "阿里的域名解析表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Language",
                columns: table => new
                {
                    LanguageId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Lang = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "语言类型 csharp java c c++ 等")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Text = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "名称-显示")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Build = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "构建使用的主命令")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    BuildCommand = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "构建使用的命令")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Exec = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "执行的主命令")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExecCommand = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false, comment: "执行的使用的命令")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LangType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "语言的编译类型   Compiled 编译型  Interpretation 解释型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Language", x => x.LanguageId);
                },
                comment: "运行语言配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Menu",
                columns: table => new
                {
                    MenuId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "菜单code名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Path = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "路由")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "菜单标题")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Icon = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "icon")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Type = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, comment: "类型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Component = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "组件")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Tag = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "标记")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Hidden = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否隐藏")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    HiddenBreadcrumb = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "隐藏面包屑")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Affix = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否固定")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ParentId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: true, comment: "父级标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Color = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "颜色")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    FullPage = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "整页路由")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Active = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "高亮  子节点或详情页需要高亮的上级菜单路由地址")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SeqNo = table.Column<int>(type: "int", nullable: false, comment: "排序序号"),
                    Redirect = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "重定向")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LevelCode = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "层级编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Menu", x => x.MenuId);
                },
                comment: "菜单/权限表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Order",
                columns: table => new
                {
                    OrderId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Payer = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Money = table.Column<long>(type: "bigint", nullable: false),
                    Area = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OrderStatus = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OrderTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Order", x => x.OrderId);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Project",
                columns: table => new
                {
                    ProjectId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProjectName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "项目名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProjectCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "项目编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SeqNo = table.Column<int>(type: "int", nullable: false, comment: "排序序号"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Project", x => x.ProjectId);
                },
                comment: "项目表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Question",
                columns: table => new
                {
                    QuestionId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "试题名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionDescribe = table.Column<string>(type: "longtext", nullable: true, comment: "试题描述")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionCase = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "测试用例")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Question", x => x.QuestionId);
                },
                comment: "试题表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "RequestLog",
                columns: table => new
                {
                    RequestLogId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LogType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "日志类型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LogName = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false, comment: "日志名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ApiPath = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "请求路径")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    HttpMethod = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "请求方法 http method POST GET PUT DELETE")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Ip = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "客户端ip")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Event = table.Column<string>(type: "text", nullable: true, comment: "日志具体的内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RequestLog", x => x.RequestLogId);
                },
                comment: "请求日志")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Role",
                columns: table => new
                {
                    RoleId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "角色编号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleAlias = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "角色别名")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "角色名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SeqNo = table.Column<int>(type: "int", nullable: false, comment: "序号"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Role", x => x.RoleId);
                },
                comment: "角色表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "SystemExtensionSetting",
                columns: table => new
                {
                    SystemExtensionSettingId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Key = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "Key")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Value = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "Value")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Category = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "Category")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Title = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "Title")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SystemExtensionSetting", x => x.SystemExtensionSettingId);
                },
                comment: "系统设置中的扩展配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "SystemSetting",
                columns: table => new
                {
                    SystemSettingId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SystemName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "LogoUrl")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LogoUrl = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "系统名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LoginType = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, comment: "登录开关  all 普通用户+管理员用户  user 普通用户 admin 管理员用户")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PasswordRegex = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "密码验证规则")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Copyright = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "版权信息")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SystemSetting", x => x.SystemSettingId);
                },
                comment: "系统配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Tenant",
                columns: table => new
                {
                    TenantId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "租户名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantAliasName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "租户别名")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantCode = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "租户编号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ContactName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "联系人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ContactPhone = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "联系人电话")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExpireTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "过期时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantAddress = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "租户地址")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantMail = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "租户邮箱")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TenantDomain = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "域名")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LogoUrl = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "logo 地址")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tenant", x => x.TenantId);
                },
                comment: "租户表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "UploadFiles",
                columns: table => new
                {
                    UploadFilesId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    FileNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "文件号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Length = table.Column<long>(type: "bigint", nullable: false, comment: "文件大小"),
                    ExtInfo = table.Column<string>(type: "text", nullable: true, comment: "文件扩展信息")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Hash = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "文件hash")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Path = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "完整存储路径")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OriginName = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "原文件名")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    IsTemp = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否是临时文件"),
                    StorageKey = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "存储来源 local 本地 其他的归属为 oss 的 key")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UploadFiles", x => x.UploadFilesId);
                },
                comment: "上传文件")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "User",
                columns: table => new
                {
                    UserId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UserAvatar = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "用户头像")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UserName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "姓名")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Account = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UserNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "用户编号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleIds = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "用户角色")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DepartmentId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: true, comment: "部门标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Password = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "密码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User", x => x.UserId);
                },
                comment: "用户表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "UserClient",
                columns: table => new
                {
                    UserClientId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ConnectionId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "链接ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Account = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserClient", x => x.UserClientId);
                },
                comment: "用户client")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "UserMessage",
                columns: table => new
                {
                    UserMessageId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Account = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Message = table.Column<string>(type: "text", nullable: true, comment: "消息内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ReadStatus = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否已读Y已读 N 未读")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Intro = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "摘要")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SendType = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "消息类型")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sender = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "发送人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    State = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "消息完成状态 S 成功  F 失败  D 执行中")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Result = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "结果 可以是附件地址")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MessageType = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false, comment: "任务类型 NOTIFY 通知 TASK 任务")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ResourceId = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "关联的资源id")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserMessage", x => x.UserMessageId);
                },
                comment: "用户消息")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlow",
                columns: table => new
                {
                    WorkFlowId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "工作流名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowCode = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工作流编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlow", x => x.WorkFlowId);
                },
                comment: "工作流表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlowDesign",
                columns: table => new
                {
                    WorkFlowDesignId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    NodeName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "节点名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Type = table.Column<int>(type: "int", nullable: false, comment: "节点类型  0 发起人   1 审批人  2 抄送人  4 条件分支"),
                    ParentId = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlowDesign", x => x.WorkFlowDesignId);
                },
                comment: "工作流设计器")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "DescribeDomainRecord",
                columns: table => new
                {
                    DescribeDomainRecordId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    domainId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    status = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    type = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    remark = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ttl = table.Column<long>(type: "bigint", nullable: false),
                    recordId = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    rr = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    domainName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    weight = table.Column<int>(type: "int", nullable: false),
                    value = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    endpoint = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DescribeDomainRecord", x => x.DescribeDomainRecordId);
                    table.ForeignKey(
                        name: "FK_DescribeDomainRecord_DescribeDomain_domainId",
                        column: x => x.domainId,
                        principalTable: "DescribeDomain",
                        principalColumn: "DescribeDomainId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "阿里的域名解析记录表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "LanguageExtensionCode",
                columns: table => new
                {
                    LanguageExtensionCodeId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Title = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "显示的标题")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "代码的文件名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Code = table.Column<string>(type: "longtext", nullable: false, comment: "代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LanguageId = table.Column<string>(type: "varchar(36)", nullable: false, comment: "运行语言的标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatorName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreatedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "创建时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedBy = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "最后修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "修改人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifiedTime = table.Column<string>(type: "varchar(19)", maxLength: 19, nullable: false, comment: "最后修改时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disabled = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否禁用")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Deleted = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: false, comment: "是否删除")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<DateTime>(type: "timestamp(6)", rowVersion: true, nullable: false, comment: "时间戳")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LanguageExtensionCode", x => x.LanguageExtensionCodeId);
                    table.ForeignKey(
                        name: "FK_LanguageExtensionCode_Language_LanguageId",
                        column: x => x.LanguageId,
                        principalTable: "Language",
                        principalColumn: "LanguageId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "语言下的 扩展类库")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "MenuApiAuth",
                columns: table => new
                {
                    MenuApiAuthId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MenuId = table.Column<string>(type: "varchar(36)", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Code = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "接口权限标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Url = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "接口地址  相对路径  比如 api/setting/role")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MenuApiAuth", x => x.MenuApiAuthId);
                    table.ForeignKey(
                        name: "FK_MenuApiAuth_Menu_MenuId",
                        column: x => x.MenuId,
                        principalTable: "Menu",
                        principalColumn: "MenuId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "菜单接口权限表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "QuestionLanguage",
                columns: table => new
                {
                    QuestionLanguageId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Language = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "语言")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "试题标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExamplesFileName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "示例代码的文件名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExecFileName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "执行代码的文件名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Examples = table.Column<string>(type: "longtext", nullable: false, comment: "示例代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DependCodes = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "依赖的公共库的代码标识集合，逗号分割")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_QuestionLanguage", x => x.QuestionLanguageId);
                    table.ForeignKey(
                        name: "FK_QuestionLanguage_Question_QuestionId",
                        column: x => x.QuestionId,
                        principalTable: "Question",
                        principalColumn: "QuestionId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "试题配置语言表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "RoleExtensionPermission",
                columns: table => new
                {
                    RoleExtensionPermissionId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "角色标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AuthType = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "权限类型 数据权限   data   控制台模块 dashboardmodule  控制台  dashboard")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AuthKey = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false, comment: "扩展权限对应的key")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AuthValue = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: false, comment: "扩展权限对应的值")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RoleExtensionPermission", x => x.RoleExtensionPermissionId);
                    table.ForeignKey(
                        name: "FK_RoleExtensionPermission_Role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Role",
                        principalColumn: "RoleId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "角色扩展权限配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "RoleMenu",
                columns: table => new
                {
                    RoleMenuId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RoleId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "角色标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MenuId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "菜单标识")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RoleMenu", x => x.RoleMenuId);
                    table.ForeignKey(
                        name: "FK_RoleMenu_Role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Role",
                        principalColumn: "RoleId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "角色菜单配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "SystemSms",
                columns: table => new
                {
                    SystemSmsId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Status = table.Column<string>(type: "char", fixedLength: true, nullable: false, comment: "短信状态 Y 开 N 关")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AppKey = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "短信key")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SecretKey = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "短信 secret ")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SystemSettingId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: true, comment: "系统配置标识")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SystemSms", x => x.SystemSmsId);
                    table.ForeignKey(
                        name: "FK_SystemSms_SystemSetting_SystemSettingId",
                        column: x => x.SystemSettingId,
                        principalTable: "SystemSetting",
                        principalColumn: "SystemSettingId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "系统短信配置表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlowDesignApprove",
                columns: table => new
                {
                    WorkFlowDesignApproveId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ApproveType = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "审批人员类型  1指定成员  2主管  3角色  4发起人自选  5发起人自己  7连续多级主管")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    NodeRole = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "节点角色 针对审批--  节点用户-选择的是角色的话，这里就会有角色信息  {id,name}")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkDesignNodeRoleOrUser = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "针对审批--  节点用户-选择的是指定成员的话，这里就会有人员信息 {id,name}")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExamineLevel = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "审批的主管的级别，比如 发起人的第X级主管")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SelectMode = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "发起人自选 1 自选一个人  2 自选多个人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DirectorMode = table.Column<int>(type: "int", maxLength: 500, nullable: false, comment: "主管审批终点模式  0 直到最上层主管  1 自定义审批终点"),
                    DirectorLevel = table.Column<int>(type: "int", maxLength: 500, nullable: false, comment: "主管级别  第X级主管"),
                    TermAutoStatus = table.Column<string>(type: "char", fixedLength: true, nullable: true, comment: "超时自动审批 状态")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Term = table.Column<int>(type: "int", nullable: false, comment: "审批期限（为 0 则不生效）"),
                    TermMode = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "审批期限超时后执行  0 自动通过   1 自动拒绝")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExamineMode = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "多人审批时审批方式  1 按顺序依次审批 2会签 (可同时审批，每个人必须审批通过) 3或签 (有一人审批通过即可)")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowDesignId = table.Column<string>(type: "varchar(36)", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlowDesignApprove", x => x.WorkFlowDesignApproveId);
                    table.ForeignKey(
                        name: "FK_WorkFlowDesignApprove_WorkFlowDesign_WorkFlowDesignId",
                        column: x => x.WorkFlowDesignId,
                        principalTable: "WorkFlowDesign",
                        principalColumn: "WorkFlowDesignId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "审批者 配置")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlowDesignBranch",
                columns: table => new
                {
                    WorkFlowDesignBranchId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Conditions = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "分支条件")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowDesignId = table.Column<string>(type: "varchar(36)", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlowDesignBranch", x => x.WorkFlowDesignBranchId);
                    table.ForeignKey(
                        name: "FK_WorkFlowDesignBranch_WorkFlowDesign_WorkFlowDesignId",
                        column: x => x.WorkFlowDesignId,
                        principalTable: "WorkFlowDesign",
                        principalColumn: "WorkFlowDesignId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "条件分支相关配配置")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlowDesignPromoter",
                columns: table => new
                {
                    WorkFlowDesignPromoterId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    NodeRoles = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "节点角色集合")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowDesignId = table.Column<string>(type: "varchar(36)", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlowDesignPromoter", x => x.WorkFlowDesignPromoterId);
                    table.ForeignKey(
                        name: "FK_WorkFlowDesignPromoter_WorkFlowDesign_WorkFlowDesignId",
                        column: x => x.WorkFlowDesignId,
                        principalTable: "WorkFlowDesign",
                        principalColumn: "WorkFlowDesignId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "发起人 配置")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "WorkFlowDesignSend",
                columns: table => new
                {
                    WorkFlowDesignSendId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    NodeUsers = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "抄送人集合")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UserSelect = table.Column<string>(type: "char", fixedLength: true, nullable: true, comment: "允许发起人自选抄送人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkFlowDesignId = table.Column<string>(type: "varchar(36)", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkFlowDesignSend", x => x.WorkFlowDesignSendId);
                    table.ForeignKey(
                        name: "FK_WorkFlowDesignSend_WorkFlowDesign_WorkFlowDesignId",
                        column: x => x.WorkFlowDesignId,
                        principalTable: "WorkFlowDesign",
                        principalColumn: "WorkFlowDesignId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "抄送人 配置")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "QuestionExtensionCode",
                columns: table => new
                {
                    QuestionExtensionCodeId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "主键")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionLanguageId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false, comment: "试题语言标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QuestionId = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: true, comment: "试题标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "代码的文件名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Code = table.Column<string>(type: "longtext", nullable: false, comment: "代码")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_QuestionExtensionCode", x => x.QuestionExtensionCodeId);
                    table.ForeignKey(
                        name: "FK_QuestionExtensionCode_QuestionLanguage_QuestionLanguageId",
                        column: x => x.QuestionLanguageId,
                        principalTable: "QuestionLanguage",
                        principalColumn: "QuestionLanguageId",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "试题扩展代码表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "Menu",
                columns: new[] { "MenuId", "Active", "Affix", "Color", "Component", "CreatedBy", "CreatedTime", "CreatorName", "Deleted", "Disabled", "FullPage", "Hidden", "HiddenBreadcrumb", "Icon", "LastModifiedBy", "LastModifiedTime", "LastModifierName", "LevelCode", "Name", "ParentId", "Path", "Redirect", "SeqNo", "Tag", "Title", "Type" },
                values: new object[,]
                {
                    { "cachemanage", "", "N", "", "setting/cache", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-brush-filled", "admin", "2024-02-05 15:15:14", "admin", "00000009", "cachemanage", "setting", "/setting/cache", "", 0, "", "缓存管理", "menu" },
                    { "dashboard", "", "N", "", "home", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-menu", "admin", "2024-02-05 15:15:14", "admin", "00000001", "dashboard", "home", "/dashboard", "", 0, "NEW", "控制台", "menu" },
                    { "dept", "", "N", "", "setting/dept", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "sc-icon-organization", "admin", "2024-02-05 15:15:14", "admin", "00000004", "dept", "setting", "/setting/dept", "", 0, "", "部门管理", "menu" },
                    { "domain", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-promotion", "admin", "2024-02-05 15:15:14", "admin", "00000004", "domain", "", "/domain", "", 0, "", "域名", "menu" },
                    { "domainManage", "", "N", "", "domain/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-promotion", "admin", "2024-02-05 15:15:14", "admin", "00000001", "domainManage", "domain", "/domain/index", "", 0, "", "域名管理", "menu" },
                    { "filemanage", "", "N", "", "platform/file", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-files", "admin", "2024-02-05 15:15:14", "admin", "00000003", "filemanage", "platform", "/platform/file", "", 0, "", "文件管理", "menu" },
                    { "home", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-eleme-filled", "admin", "2024-02-05 15:15:14", "admin", "00000001", "home", "", "/home", "", 0, "", "首页", "menu" },
                    { "ide", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "sc-icon-code", "admin", "2024-02-05 15:15:14", "admin", "00000003", "ide", "", "/ide", "", 0, "", "IDE", "menu" },
                    { "iframe", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-position", "admin", "2024-02-05 15:15:14", "admin", "00000001", "iframe", "other", "/iframe", "", 0, "", "Iframe", "menu" },
                    { "languageCode", "", "N", "", "language/code", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "Y", "N", "sc-icon-code", "admin", "2024-02-05 15:15:14", "admin", "00000005", "languageCode", "ide", "/language/code", "", 0, "", "运行语言类库", "menu" },
                    { "monitor", "", "N", "", "platform/monitor", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-monitor", "admin", "2024-02-05 15:15:14", "admin", "00000003", "monitor", "home", "/platform/monitor", "", 0, "", "监控", "menu" },
                    { "other", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-more", "admin", "2024-02-05 15:15:14", "admin", "00000006", "other", "", "/other", "", 0, "", "其他", "menu" },
                    { "pcclientupload", "", "N", "", "test/uploadclient/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-apple", "admin", "2024-02-05 15:15:14", "admin", "00000002", "pcclientupload", "vab", "/test/uploadclient/index", "", 0, "", "上传客户端", "menu" },
                    { "platform", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-monitor", "admin", "2024-02-05 15:15:14", "admin", "00000009", "platform", "", "/platform", "", 0, "", "平台", "menu" },
                    { "polyvplayer", "", "N", "", "test/polyvplayer/vid", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "sc-icon-code", "admin", "2024-02-05 15:15:14", "admin", "00000008", "polyvplayer", "setting", "/test/polyvplayer/vid", "", 0, "", "保利威vid", "menu" },
                    { "project", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-tickets", "admin", "2024-02-05 15:15:14", "admin", "00000002", "project", "", "/project", "", 0, "", "项目", "menu" },
                    { "projectManage", "", "N", "", "project/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-mouse", "admin", "2024-02-05 15:15:14", "admin", "00000001", "projectManage", "project", "/project/index", "", 0, "", "项目管理", "menu" },
                    { "questionLanguage", "", "N", "", "question/questionLanuage", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "Y", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000003", "questionLanguage", "ide", "/question/language", "", 0, "", "试题语言", "menu" },
                    { "questionMnage", "", "N", "", "question/question", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-aim", "admin", "2024-02-05 15:15:14", "admin", "00000002", "questionMnage", "ide", "/question/index", "", 0, "", "试题管理", "menu" },
                    { "role", "", "N", "", "setting/role", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-notebook", "admin", "2024-02-05 15:15:14", "admin", "00000001", "role", "setting", "/setting/role", "", 0, "", "角色管理", "menu" },
                    { "runCode", "", "N", "", "myCodemirror/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "sc-icon-code", "admin", "2024-02-05 15:15:14", "admin", "00000004", "runCode", "ide", "/myCodemirror/index", "", 0, "", "代码运行", "menu" },
                    { "runlanguage", "", "N", "", "language/language", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-apple", "admin", "2024-02-05 15:15:14", "admin", "00000001", "runlanguage", "ide", "/language/index", "", 0, "", "运行语言", "menu" },
                    { "scuidoc", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000001", "scuidoc", "iframe", "https://lolicode.gitee.io/scui-doc", "", 0, "", "SCUI文档", "iframe" },
                    { "server_monitor", "", "N", "", "platform/monitor", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-monitor", "admin", "2024-02-05 15:15:14", "admin", "00000001", "server_monitor", "platform", "/platform/monitor", "", 0, "", "系统监控", "menu" },
                    { "setting", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-setting", "admin", "2024-02-05 15:15:14", "admin", "00000010", "setting", "", "/setting", "", 0, "", "配置", "menu" },
                    { "settingdic", "", "N", "", "setting/dic", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-document", "admin", "2024-02-05 15:15:14", "admin", "00000006", "settingdic", "setting", "/setting/dic", "", 0, "", "字典管理", "menu" },
                    { "settinglog", "", "N", "", "setting/log", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-warning", "admin", "2024-02-05 15:15:14", "admin", "00000011", "settinglog", "setting", "/setting/log", "", 0, "", "系统日志", "menu" },
                    { "settingMenu", "", "N", "", "setting/menu", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-fold", "admin", "2024-02-05 15:15:14", "admin", "00000002", "settingMenu", "setting", "/setting/menu", "", 0, "", "菜单管理", "menu" },
                    { "settingsystem", "", "N", "", "setting/system", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-setting", "admin", "2024-02-05 15:15:14", "admin", "00000005", "settingsystem", "setting", "/setting/system", "", 0, "", "系统配置", "menu" },
                    { "settingtask", "", "N", "", "setting/task", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-alarm-clock", "admin", "2024-02-05 15:15:14", "admin", "00000007", "settingtask", "setting", "/setting/task", "", 0, "", "计划任务", "menu" },
                    { "SingalR", "", "N", "", "test/message/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-soccer", "admin", "2024-02-05 15:15:14", "admin", "00000010", "SingalR", "setting", "/test/message/index", "", 0, "", "SingalR", "menu" },
                    { "tenant", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-compass", "admin", "2024-02-05 15:15:14", "admin", "00000008", "tenant", "", "/tenant", "", 0, "", "租户", "menu" },
                    { "tenantManage", "", "N", "", "tenant/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-compass", "admin", "2024-02-05 15:15:14", "admin", "00000002", "tenantManage", "platform", "/tenant/index", "", 0, "", "租户管理", "menu" },
                    { "user", "", "N", "", "setting/user", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-user-filled", "admin", "2024-02-05 15:15:14", "admin", "00000003", "user", "setting", "/setting/user", "", 0, "", "用户管理", "menu" },
                    { "user.add", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000001", "user.add", "user", "", "", 0, "", "添加", "button" },
                    { "user.batch.remove", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000002", "user.batch.remove", "user", "", "", 0, "", "批量删除", "button" },
                    { "user.detail", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000004", "user.detail", "user", "", "", 0, "", "查看", "button" },
                    { "user.list", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000007", "user.list", "user", "", "", 0, "", "列表", "button" },
                    { "user.remove", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000006", "user.remove", "user", "", "", 0, "", "删除", "button" },
                    { "user.reset.password", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000003", "user.reset.password", "user", "", "", 0, "", "密码重置", "button" },
                    { "user.update", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000005", "user.update", "user", "", "", 0, "", "编辑", "button" },
                    { "userCenter", "", "N", "", "userCenter", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-user", "admin", "2024-02-05 15:15:14", "admin", "00000002", "userCenter", "home", "/usercenter", "", 0, "NEW", "帐号信息", "menu" },
                    { "vab", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-takeaway-box", "admin", "2024-02-05 15:15:14", "admin", "00000007", "vab", "", "", "", 0, "", "组件", "menu" },
                    { "vabupload", "", "N", "", "vab/upload", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000003", "vabupload", "vab", "/vab/upload", "", 0, "", "上传", "menu" },
                    { "workflow", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-share", "admin", "2024-02-05 15:15:14", "admin", "00000005", "workflow", "", "/workflow", "", 0, "", "流程", "menu" },
                    { "workflow.add", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000001", "workflow.add", "workflowmanage", "", "", 0, "", "添加", "button" },
                    { "workflow.design", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000002", "workflow.design", "workflowmanage", "", "", 0, "", "设计流程", "button" },
                    { "workflow.remove", "", "N", "", "", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "", "admin", "2024-02-05 15:15:14", "admin", "00000000", "workflow.remove", "workflowmanage", "", "", 0, "", "删除", "button" },
                    { "workflowdesign", "", "N", "", "workflow/design", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "Y", "N", "sc-icon-code", "admin", "2024-02-05 15:15:14", "admin", "00000002", "workflowdesign", "workflow", "/workflow/design", "", 0, "", "流程设计", "menu" },
                    { "workflowmanage", "", "N", "", "workflow/index", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "N", "N", "N", "el-icon-share", "admin", "2024-02-05 15:15:14", "admin", "00000001", "workflowmanage", "workflow", "/workflow/index", "", 0, "", "流程管理", "menu" }
                });

            migrationBuilder.InsertData(
                table: "Role",
                columns: new[] { "RoleId", "CreatedBy", "CreatedTime", "CreatorName", "Deleted", "Disabled", "LastModifiedBy", "LastModifiedTime", "LastModifierName", "Remark", "RoleAlias", "RoleName", "RoleNo", "SeqNo" },
                values: new object[] { "default", "admin", "2024-02-05 15:15:14", "admin", "N", "N", "admin", "2024-02-05 15:15:14", "admin", "", "超级管理员", "超级管理员", "ROLE20240205151514498", 0 });

            migrationBuilder.InsertData(
                table: "User",
                columns: new[] { "UserId", "Account", "CreatedBy", "CreatedTime", "CreatorName", "Deleted", "DepartmentId", "Disabled", "LastModifiedBy", "LastModifiedTime", "LastModifierName", "Password", "RoleIds", "UserAvatar", "UserName", "UserNo" },
                values: new object[] { "admin", "admin", "admin", "2024-02-05 15:15:14", "admin", "N", "", "N", "admin", "2024-02-05 15:15:14", "admin", "E10ADC3949BA59ABBE56E057F20F883E", "default", "", "admin", "USER20240205151514580" });

            migrationBuilder.InsertData(
                table: "RoleMenu",
                columns: new[] { "RoleMenuId", "MenuId", "RoleId" },
                values: new object[,]
                {
                    { "082c974a574a9dc021d08a86dfc1f56e", "monitor", "default" },
                    { "0b731e2014e93cbd9934059522a939cd", "iframe", "default" },
                    { "0b9f614a452154bbfaec14470a1738a9", "user.batch.remove", "default" },
                    { "0e9ef2f6eecdc98bad6c3f76f9f00b4b", "runlanguage", "default" },
                    { "0fbf3ec22f5a265457d2200a2ba18c0f", "languageCode", "default" },
                    { "131157a2d62e8442334539877070dda7", "settinglog", "default" },
                    { "177ae8f01f1d48880407445dad0fb0d1", "user.list", "default" },
                    { "1d5eebbc1c7121d40c95ab134c608d22", "tenant", "default" },
                    { "237255c053ef4585487bc3de9c60340d", "user.reset.password", "default" },
                    { "2a360011bfe26a27998584e89b752072", "projectManage", "default" },
                    { "30a55a02420692ddc6eae73494ae91b4", "ide", "default" },
                    { "364336dd34a2891ba97bd7882be0ef9a", "workflow", "default" },
                    { "395276da7ed8de02ee1a68187d170d1c", "role", "default" },
                    { "437fc89027b3b97cdb3c68e98fc3b0f6", "scuidoc", "default" },
                    { "464b4043ce066fafd11b0c51a4e370bf", "settingMenu", "default" },
                    { "471bae2e03da97396042e74e1ce11ef7", "filemanage", "default" },
                    { "4948c604e9c62d3f732d1da5a6f5b5a8", "vab", "default" },
                    { "4d752bf50302b50bc10f0dcfa89642d3", "setting", "default" },
                    { "4eb063e0205afe965a6906e1017341a2", "home", "default" },
                    { "54054590ea08e2f020196ec53f10743a", "user", "default" },
                    { "5b4fe5b2948074e76107ceb5199f8f84", "platform", "default" },
                    { "5cb664798098cf1c78e8a8c7aaefa0b6", "dashboard", "default" },
                    { "65f46da0f60bf4dbd66f427c0e188907", "user.detail", "default" },
                    { "692ffcc1c1520dba60ff809c5e220106", "pcclientupload", "default" },
                    { "6b22b570930bfaecc84d1619bbe01e86", "dept", "default" },
                    { "924a1d2b49c6516161bdacec89583574", "vabupload", "default" },
                    { "99aa2cb2ed63a3d45122f860fcdd2315", "user.update", "default" },
                    { "9cb90f7b060ffb135cc1222cd4d75c3d", "workflow.remove", "default" },
                    { "a19c4a72b43c7dff4c603678c922ac21", "questionMnage", "default" },
                    { "a1eac4555eaf1b683c433cce8fef7070", "tenantManage", "default" },
                    { "a1fb81c3145acd73509460cf3afff936", "server_monitor", "default" },
                    { "a9651725185e44acf62a4c838e725d05", "workflow.add", "default" },
                    { "aafcc2a7efa550958e25cb2ab0ff1bd8", "user.remove", "default" },
                    { "ac79cf63eae2ebde90de40abadee3244", "workflowmanage", "default" },
                    { "af3147288af9debef994d07136e8745a", "settingdic", "default" },
                    { "b01afbc4ab0044b6cb75b09d53f4d299", "settingsystem", "default" },
                    { "b0949192c0f5aeb159de2316368d04fd", "SingalR", "default" },
                    { "b269a856634ed204b14eb3f74d2ea786", "user.add", "default" },
                    { "ba6f7f8eb862aa35c2cf06199e75b1fe", "settingtask", "default" },
                    { "be1b836e3f9d774d774346d6f27f81e6", "project", "default" },
                    { "be5a1cc297a50e79513abfc2f46f052d", "runCode", "default" },
                    { "bfc8fe5c9514c2beb13287e8b341a5bc", "workflow.design", "default" },
                    { "bfe99722d19f39598bebef5fa272e738", "other", "default" },
                    { "c4f1cefadddd9091bbd8ae872ac3e13d", "userCenter", "default" },
                    { "cf62af80f0d8ca9c87742ea5c6464091", "cachemanage", "default" },
                    { "d7edd9a6abeea31ec1df102f9745ddda", "domain", "default" },
                    { "daf01b9c2fda25a2ba6a2183aaf9e3ea", "polyvplayer", "default" },
                    { "e4125fd3ab6c3a5d519f4ca39d36fd9a", "questionLanguage", "default" },
                    { "eb755e308e9986aa1a37896c908878b5", "workflowdesign", "default" },
                    { "fb448af2c6d2ae138881289482aaa889", "domainManage", "default" }
                });

            migrationBuilder.CreateIndex(
                name: "IX_DescribeDomainRecord_domainId",
                table: "DescribeDomainRecord",
                column: "domainId");

            migrationBuilder.CreateIndex(
                name: "IX_LanguageExtensionCode_LanguageId",
                table: "LanguageExtensionCode",
                column: "LanguageId");

            migrationBuilder.CreateIndex(
                name: "IX_MenuApiAuth_MenuId",
                table: "MenuApiAuth",
                column: "MenuId");

            migrationBuilder.CreateIndex(
                name: "IX_QuestionExtensionCode_QuestionLanguageId",
                table: "QuestionExtensionCode",
                column: "QuestionLanguageId");

            migrationBuilder.CreateIndex(
                name: "IX_QuestionLanguage_QuestionId",
                table: "QuestionLanguage",
                column: "QuestionId");

            migrationBuilder.CreateIndex(
                name: "IX_RoleExtensionPermission_RoleId",
                table: "RoleExtensionPermission",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_RoleMenu_RoleId",
                table: "RoleMenu",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_SystemSms_SystemSettingId",
                table: "SystemSms",
                column: "SystemSettingId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_WorkFlowDesignApprove_WorkFlowDesignId",
                table: "WorkFlowDesignApprove",
                column: "WorkFlowDesignId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_WorkFlowDesignBranch_WorkFlowDesignId",
                table: "WorkFlowDesignBranch",
                column: "WorkFlowDesignId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_WorkFlowDesignPromoter_WorkFlowDesignId",
                table: "WorkFlowDesignPromoter",
                column: "WorkFlowDesignId",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_WorkFlowDesignSend_WorkFlowDesignId",
                table: "WorkFlowDesignSend",
                column: "WorkFlowDesignId",
                unique: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "DataDic");

            migrationBuilder.DropTable(
                name: "Department");

            migrationBuilder.DropTable(
                name: "DescribeDomainRecord");

            migrationBuilder.DropTable(
                name: "LanguageExtensionCode");

            migrationBuilder.DropTable(
                name: "MenuApiAuth");

            migrationBuilder.DropTable(
                name: "Order");

            migrationBuilder.DropTable(
                name: "Project");

            migrationBuilder.DropTable(
                name: "QuestionExtensionCode");

            migrationBuilder.DropTable(
                name: "RequestLog");

            migrationBuilder.DropTable(
                name: "RoleExtensionPermission");

            migrationBuilder.DropTable(
                name: "RoleMenu");

            migrationBuilder.DropTable(
                name: "SystemExtensionSetting");

            migrationBuilder.DropTable(
                name: "SystemSms");

            migrationBuilder.DropTable(
                name: "Tenant");

            migrationBuilder.DropTable(
                name: "UploadFiles");

            migrationBuilder.DropTable(
                name: "User");

            migrationBuilder.DropTable(
                name: "UserClient");

            migrationBuilder.DropTable(
                name: "UserMessage");

            migrationBuilder.DropTable(
                name: "WorkFlow");

            migrationBuilder.DropTable(
                name: "WorkFlowDesignApprove");

            migrationBuilder.DropTable(
                name: "WorkFlowDesignBranch");

            migrationBuilder.DropTable(
                name: "WorkFlowDesignPromoter");

            migrationBuilder.DropTable(
                name: "WorkFlowDesignSend");

            migrationBuilder.DropTable(
                name: "DescribeDomain");

            migrationBuilder.DropTable(
                name: "Language");

            migrationBuilder.DropTable(
                name: "Menu");

            migrationBuilder.DropTable(
                name: "QuestionLanguage");

            migrationBuilder.DropTable(
                name: "Role");

            migrationBuilder.DropTable(
                name: "SystemSetting");

            migrationBuilder.DropTable(
                name: "WorkFlowDesign");

            migrationBuilder.DropTable(
                name: "Question");
        }
    }
}
